/**********************************************************************
 *
 * $RCSfile: ThreadPool.java,v $  $Revision: 1.1 $  $Date: 2009/08/09 08:00:56 $
 *
 * $Log: ThreadPool.java,v $
 * Revision 1.1  2009/08/09 08:00:56  @author simplefan
 * *** empty log message ***
 *
 *
 *
 *********************************************************************/
/*
 * Copyright 2008 gxlu, Inc. All rights reserved.
 * File name : ThreadPool.java
 * Created on : Jul 30, 2009 1:57:18 AM
 * Creator : lethe
 */
package com.simplefan.meta.eda;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import org.apache.log4j.Logger;

/**
 * <pre>
 * Description : TODO
 * @author simplefan
 * </pre>
 */
public class ThreadPool {

  private static Logger logger = Logger.getLogger(EventPublishCenter.class);

  private static ExecutorService executorService = Executors.newFixedThreadPool(20);

  public static void executorRunnable(Runnable command) {
    try {
      executorService.execute(command);
    }
    catch(Throwable e) {
      logger.error(e);
    }
  }

}
